import request from '@/utils/request'

// 查询客诉工单站内信列表
export function listKsLetter(query) {
  return request({
    url: '/hmk/ksLetter/list',
    method: 'get',
    params: query
  })
}

// 查询客诉工单站内信详细
export function getKsLetter(id) {
  return request({
    url: '/hmk/ksLetter/' + id,
    method: 'get'
  })
}

// 新增客诉工单站内信
export function addKsLetter(data) {
  return request({
    url: '/hmk/ksLetter',
    method: 'post',
    data: data
  })
}

export function delayHandler(data) {
  return request({
    url: '/hmk/ksLetter/delayHandler',
    method: 'post',
    data: data
  })
}


export function delayOrderHandler(data) {
  return request({
    url: '/hmk/ksLetter/delayOrderHandler',
    method: 'post',
    data: data
  })
}


export function getByAuditUser(data) {
  return request({
    url: '/hmk/ksLetter/getByAuditUser',
    method: 'post',
    data: data
  })
}


export function getOrderByAuditUser(data) {
  return request({
    url: '/hmk/orderLetter/getOrderByAuditUser',
    method: 'post',
    data: data
  })
}


// 修改客诉工单站内信
export function updateKsLetter(data) {
  return request({
    url: '/hmk/ksLetter',
    method: 'put',
    data: data
  })
}

export function getKsMessageNumber(data) {
  return request({
    url: '/hmk/ksLetter/getKsMessageNumber',
    method: 'post',
    headers: {
      repeatSubmit: false
    },
    data: data
  })
}


// 删除客诉工单站内信
export function delKsLetter(id) {
  return request({
    url: '/hmk/ksLetter/' + id,
    method: 'delete'
  })
}
